import { request } from "../utils/request";

/**计数器api命名空间 */
export namespace CounterApi {
  /**获取计数器项目 */
  export function getProjects() {
    return request({
      url: "/counter/projects",
      method: "GET",
    });
  }

  /**创建计数器项目 */
  export function createProject(projectName: string) {
    return request({
      url: "/counter/createProject",
      method: "POST",
      data: { projectName },
    });
  }

  /**删除计数器项目 */
  export function deleteProject(projectId: string) {
    return request({
      url: "/counter/deleteProject",
      method: "POST",
      data: { projectId },
    });
  }

  /**更新计数器项目名称 */
}
